﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="DistributedList.ascx.cs"
    Inherits="Framework.Module.CMS.Admin.WorkFlow.DistributedList" %>
<%@ Register Src="../UserControls/SelectDate.ascx" TagName="SelectDate" TagPrefix="uc1" %>
<%@ Register Assembly="Framework.Library" Namespace="Framework.Library.Controls"
    TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:UpdatePanel ID="uppanelDistribution" runat="server" UpdateMode="Conditional"
    RenderMode="Inline">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="dropZones" EventName="SelectedIndexChanged" />
        <asp:AsyncPostBackTrigger ControlID="dtgDeployList" EventName="RowCommand" />
    </Triggers>
    <ContentTemplate>
        <table id="Table1" cellpadding="3" cellspacing="0" width="100%">
            <tr>
                <td colspan="2">
                    <table cellpadding="2" cellspacing="2" width="100%">
                        <tr>
                            <td>
                                <b>Chuyên mục</b></td>
                            <td>
                                <asp:DropDownList ID="dropZones" runat="server" AutoPostBack="False" Width="480px">
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                Từ khóa tìm kiếm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtkeysearch" runat="server"
                                    Width="395px"></asp:TextBox></td>
                        </tr>
                        <tr><td colspan="2" style="height:10px;"></td></tr>
                        <tr>
                            <td align="right">
                               </td>
                            <td>
                                <strong>Loại bài :</strong>
                                    <asp:RadioButtonList ID="rdoContentRanks" runat="server" RepeatDirection="Horizontal"
                                        RepeatLayout="Flow" CellPadding="5" CellSpacing="5">
                                        <asp:ListItem Value="0" Selected="True">Tất cả&nbsp;&nbsp;</asp:ListItem>
                                        <asp:ListItem Value="1" >B&#236;nh thường&nbsp;&nbsp;</asp:ListItem>
                                        <asp:ListItem Value="2">Ti&#234;u điểm&nbsp;&nbsp;</asp:ListItem>
                                        <asp:ListItem Value="3">Nổi bật&nbsp;&nbsp;</asp:ListItem>     
                                        <asp:ListItem Value="4">Tin n&#243;ng trang chủ&nbsp;&nbsp;</asp:ListItem>        
                                        <asp:ListItem Value="5">Hiển thị trang Giới thiệu</asp:ListItem>                                           
                                    </asp:RadioButtonList><br><br></td>
                        </tr>    
                        <tr><td colspan="2" style="height:10px;"></td></tr>
                        <tr>
                            <td align="right">
                                từ ngày&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td valign="top">
                                            <uc1:SelectDate ID="SelectDate1" runat="server"></uc1:SelectDate>
                                        </td>
                                        <td valign="top">
                                            &nbsp;đến ngày&nbsp;</td>
                                        <td valign="top">
                                            <uc1:SelectDate ID="SelectDate2" runat="server"></uc1:SelectDate>
                                        </td>
                                        <td style="padding-left: 20px;">
                                            <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" CssClass="Button" OnClick="btnSearch_Click" /></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>                       
                        <tr>
                            <td colspan="2" style="width: 100%">
                                <cc1:GridView ID="dtgDeployList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    BorderColor="Gainsboro" BorderStyle="Solid" BorderWidth="1px" CellPadding="2"
                                    CssClass="Grid" PageSize="15" Width="100%" OnRowDataBound="dtgDeployList_RowDataBound"
                                    OnRowCommand="dtgDeployList_RowCommand">
                                    <AlternatingRowStyle CssClass="Grid_Raw2" VerticalAlign="Middle" Height="60px" />
                                    <RowStyle CssClass="Grid_Raw1" VerticalAlign="middle" Height="60px" />
                                    <HeaderStyle Font-Bold="True" CssClass="Grid_Top"></HeaderStyle>
                                    <Columns>                                        
                                        <asp:TemplateField>
                                            <headerstyle horizontalalign="Center"></headerstyle>
                                            <itemtemplate>
									<asp:CheckBox id="chkCheck" runat="server"></asp:CheckBox>
								</itemtemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="T&#234;n b&#224;i">
                                            <headerstyle horizontalalign="Center"></headerstyle>
                                            <itemstyle width="250px"></itemstyle>
                                            <itemtemplate>
									<asp:HyperLink ID="lnkHeadline" runat="server"></asp:HyperLink>
								</itemtemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText="Xem" DataField="Distribution_View" />
                                        <asp:TemplateField HeaderText="Checkout by">
                                            <headerstyle horizontalalign="Center" width="90px"></headerstyle>
                                            <itemstyle width="90px"></itemstyle>
                                            <itemtemplate>
								<asp:Label id=lblUserCheckOut runat=server></asp:Label>
						</itemtemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <headerstyle horizontalalign="Center" width="80px"></headerstyle>
                                            <itemstyle horizontalalign="Center"></itemstyle>
                                            <headertemplate>
									<asp:Button ID="cmdUpdateRank" runat="server" Width="80px" CommandName="updaterank"
										CssClass="Button" Text="Cập nhật"></asp:Button>
								</headertemplate>
                                            <itemtemplate>
                        <asp:DropDownList id="dropContentRank" runat="server" Width="80px">
								<asp:ListItem Value="1">B&#236;nh thường</asp:ListItem>
								<asp:ListItem Value="2">Ti&#234;u điểm</asp:ListItem>
								<asp:ListItem Value="3">Nổi bật</asp:ListItem>
								
							</asp:DropDownList>
									
								</itemtemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <headerstyle horizontalalign="Center" width="60px"></headerstyle>
                                            <itemstyle horizontalalign="Center"></itemstyle>
                                            <headertemplate>
									<asp:Button ID="cmdUpdateIndex" runat="server" Width="60" CommandName="updatepriority"
										CssClass="Button" Text="Thứ tự"></asp:Button>
								</headertemplate>
                                            <itemtemplate>
									<asp:DropDownList ID="dropIndex" runat="server" Width="60">
									</asp:DropDownList>
								</itemtemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Thao t&#225;c">
                                            <headerstyle horizontalalign="Center" width="200px"></headerstyle>
                                            <itemstyle horizontalalign="Center"></itemstyle>
                                            <itemtemplate>
									<asp:Button ID="cmdRemove" runat="server" CssClass="Button" width=55px CommandName="remover"
										Text="Gỡ xuống" CommandArgument='<%# Eval("Content_ID") %>'></asp:Button>
									<asp:Button ID="cmdEdit" runat="server" CssClass="Button" CommandName="editcontent"
										Text="Sửa" CommandArgument='<%# Eval("Content_ID") %>'></asp:Button>
									<asp:Button ID="cmdDel" runat="server" CssClass="Button" CommandName="deletecontent"
										Text="Xóa" CommandArgument='<%# Eval("Content_ID") %>'></asp:Button>
									<asp:Button ID="cmdrollback" runat="server"   CssClass="Button" width=45px CommandName="rollback"
										Text="Rollback" Tooltip="Sử dụng lại bài viết đã được đăng trước đó" CommandArgument='<%# Eval("Content_ID") %>'></asp:Button>
									<br /><div style="padding-top:6px">
									<asp:hyperlink runat=server id="hplVersion" CssClass="lightwindow page-options" Tooltip="Xem các phiên bản của bài viết này" params="lightwindow_type=external,lightwindow_width=800,lightwindow_height=350">Version</asp:hyperlink>
									<asp:hyperlink runat=server id="hplComment" CssClass="lightwindow page-options" Tooltip="Xem các phản hồi (feedback) của bài viết này" params="lightwindow_type=external,lightwindow_width=800,lightwindow_height=350"></asp:hyperlink>
									
									</div>
								</itemtemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </cc1:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 10px">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td>
            <asp:Button ID="btnAddtoEvent" runat="server" Text="Thêm vào sự kiện" Visible="false"
                CssClass="Button" OnClick="btnAddtoEvent_Click" /></td>
    </tr>
</table>
